package org.spring.springboot.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.*;


/**
 * @ClassName WebMvcConfig
 * @Author HandsomeBugs
 * @Date 2019/7/9 11:11
 * @Version 1.0
 **/
@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {

        registry.addResourceHandler("/file/**").addResourceLocations("file:" + System.getProperty("user.dir") + "/file/");
        super.addResourceHandlers(registry);
    }
}
